﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Bamuca.Master" AutoEventWireup="true"
    CodeBehind="EditarGrupos.aspx.cs" Inherits="Bamuca.Views.EditarGrupos" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ PreviousPageType VirtualPath="~/Views/CadastrarGrupos.aspx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <div id="titulo" style="line-height: 22px; padding: 2px;">
                <center>
                    <h2 style="height: 25px; font-family: Calibri;">
                        Editar Grupos</h2>
                    <hr style="height: -12px" />
                </center>
            </div>
            <center>
                <div id="edicao" style="width: 330px; background-color: White; margin-top: 10px;">
                    <asp:HiddenField ID="hdFieldId" runat="server" />
                    <p align="left">
                        Nome do Grupo
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbNomeGrupoAlterar"
                            ErrorMessage="* Informe um nome!" ForeColor="Red"></asp:RequiredFieldValidator>
                        <br />
                        <asp:TextBox ID="tbNomeGrupoAlterar" runat="server" CssClass="txtBox" Width="180px"></asp:TextBox>
                        &nbsp;<asp:ImageButton ID="imgBtAlterar" runat="server" Height="24px" ImageUrl="~/Imagens/salvar.png"
                            OnClick="imgBtAlterar_Click" />
                        &nbsp;<asp:ImageButton ID="imgBtDeletar" runat="server" CausesValidation="False"
                            Height="24px" ImageUrl="~/Imagens/btn_excluir.png" OnClick="imgBtDeletar_Click" />
                        <asp:ConfirmButtonExtender ID="imgBtDeletar_ConfirmButtonExtender" runat="server"
                            ConfirmText="Deseja excluir o Grupo?!" Enabled="True" TargetControlID="imgBtDeletar">
                        </asp:ConfirmButtonExtender>
                        &nbsp;<asp:ImageButton ID="imgBtVoltar" runat="server" CausesValidation="False" Height="24px"
                            ImageUrl="~/Imagens/btn_volta.png" OnClick="imgBtVoltar_Click" />
                        <br />
                        <br />
                        <asp:RadioButtonList ID="rbStatusAlterar" runat="server" RepeatDirection="Horizontal"
                            RepeatLayout="Flow">
                            <asp:ListItem Value="1">Ativo</asp:ListItem>
                            <asp:ListItem Value="0">Inativo</asp:ListItem>
                        </asp:RadioButtonList>
                    </p>
                </div>
            </center>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <div id="titulo2" style="line-height: 22px; padding: 2px;">
                <center>
                    <h2 style="height: 25px; font-family: Calibri;">Incluir Grupo</h2>
                    <hr style="height: -12px" />
                </center>
            </div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="Panel1" runat="server">
                       <center>
                        <div id="inclusao" style="width: 330px; background-color: white; margin-top: 10px; line-height: 22px; padding: 2px;">
                        <p align = "left">
                            Nome do Grupo
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*Informe um nome!"
                                ForeColor="#FF3300" ControlToValidate="tbNomeGrupo"></asp:RequiredFieldValidator>
                            <br />
                            <asp:TextBox ID="tbNomeGrupo" runat="server" CssClass="txtBox" Width="180px"></asp:TextBox>
                            &nbsp;<asp:ImageButton ID="imgBtSalvar" runat="server" ImageUrl="~/Imagens/salvar.png"
                                Height="24px" OnClick="imgBtSalvar_Click" />
                            &nbsp;<asp:ImageButton ID="ibtnVolta" runat="server" Height="24px" 
                                ImageUrl="~/Imagens/btn_volta.png" onclick="ibtnVolta_Click" 
                                ToolTip="Retorna à tela de Grupos" CausesValidation="False" />
                            <br /><br />
                            <asp:RadioButtonList ID="rbStatus" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                <asp:ListItem Selected="True" Value="1">Ativo</asp:ListItem>
                                <asp:ListItem Value="0">Inativo</asp:ListItem>
                            </asp:RadioButtonList>
                            </p>
                        </div>
                        
                        <div id="cadastroSucesso" style="margin-top: 10px; width: 300px; text-align: center;
                            display: none; color: #0066FF;">
                            <center>Grupo cadastrado com sucesso!!</center>
                        </div>
                        
                        </center>
                    </asp:Panel>
                    <div id="erro" style="display: none; background-position: right; margin-top: 10px;
                        width: 300px; text-align: center; padding: 10px; background-image: url('../Imagens/erro.png');
                        background-repeat: no-repeat; height: 122px;" align="center">
                        <asp:Label ID="lblErro" runat="server" Text="Label" Style="font-weight: bold; font-family: Calibri;
                            color: Red;"></asp:Label>
                    </div>
                </ContentTemplate>                
            </asp:UpdatePanel>
        </asp:View>
    </asp:MultiView>
</asp:Content>
